<template>
  <img alt="Vue logo" src="./assets/logo.png" />
  <HelloWorld msg="Welcome to Your Vue.js + TypeScript App" :age="22" />
  <span>
    {{ age }}
  </span>
</template>

<script lang="ts">
import { defineComponent, PropType } from 'vue';
import HelloWorld from './components/HelloWorld.vue';

interface Config {
  name: string;
}
// defineComponent({
//   props: {},
//   setup() {
//     return {};
//   },
//   data: function () {
//     return {};
//   },

//   computed: {
//     xx: () => 'aa',
//   },
//   methods: {},
// });
export default defineComponent({
  name: 'App',
  props: {
    config: {
      type: Object as PropType<Config>, // 这样子使用
      required: true,
    },
  },
  components: {
    HelloWorld,
  },
  mounted() {
    this.config;
  },
});
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
